package org.gis.mapserver.layer.element;

/**
 *
 * @author gus
 */
public class Path
{
    public LatLon [] array;
    public final int length;
    
    private int [] xpoints;
    private int [] ypoints;
    

    public Path( LatLon[] array )
    {
        this.array = array;
        length= array.length;
        initialize();
    }
    
    private void initialize()
    {
        xpoints = new int[length];
        ypoints = new int[length];

        for(int i=0; i<length; i++)
        {
            xpoints[i] = array[i].latitude.degrees.intValue();
            ypoints[i] = array[i].longitude.degrees.intValue();
        }
    }
    
    
    public int [] getXPoints()
    {
        return xpoints;
    }
    
    public int [] getYPoints()
    {
        return ypoints;
    }
}
